package gonz.pages.swim;

import gonz.common.Waiter;
import gonz.data.swim.TwoPiecesSwim;
import gonz.pages.AbstractPage;
import org.apache.log4j.Logger;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

public class SwimPage extends AbstractPage {
    public static final Logger log = Logger.getLogger(SwimPage.class);


    public static final String FOOTER_ID = "footer";

    private TwoPiecesSwim swim;
    private String link;


    public SwimPage(WebDriver webDriver, String imgFolder) {
        super(webDriver);
        Waiter.waitElement(webDriver, By.id(FOOTER_ID));
        this.link = grabLink();
        this.swim = new TwoPiecesSwim(webDriver, imgFolder);
    }

    public TwoPiecesSwim getSwim() {
        return swim;
    }

    public String getLink() {
        return link;
    }

    private String grabLink() {
        return webDriver.getCurrentUrl();
    }

}
